package cs.java.collections;

import static cs.java.lang.Lang.list;

public class LinkedHashMap<K, V> extends java.util.LinkedHashMap<K, V> implements LinkedMap<K, V> {
  public V getValue(int index) {
    return list(values()).get(index);
  }

  public boolean hasKey(K key) {
    return super.containsKey(key);
  };

  public boolean hasValue(V value) {
    return super.containsValue(value);
  };

  public int indexOf(K key) {
    return list(keySet()).getIndex(key);
  }

  public V removeAt(int i) {
    return remove(list(keySet()).get(i));
  }

  public V value(K key) {
    return super.get(key);
  }

}
